//
//  CLDoctorTableViewCell.m
//  CareLink
//
//  Created by apple on 16/8/19.
//  Copyright © 2016年 Seven Team. All rights reserved.
//

#import "CLDoctorTableViewCell.h"
#import "DoctorSelectModel.h"

@interface CLDoctorTableViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *accuracyLabel;
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *nameTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *bannerLabel;
@property (weak, nonatomic) IBOutlet UILabel *flowerLabel;
@property (weak, nonatomic) IBOutlet UILabel *hospitalLabel;
@property (weak, nonatomic) IBOutlet UILabel *starLabel;
@end



@implementation CLDoctorTableViewCell

// 设置子空间
- (void)setModel:(DoctorSelectModel *)model
{
    _model = model;
    self.accuracyLabel.text = model.accuracy;
    /**
      切角
     */
    [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.doctor_portrait] placeholderImage:[UIImage imageNamed:@"doctorCount"]];
//    [self.iconImageView zy_cornerRadiusRoundingRect];
    // 设置圆角的大小
    self.iconImageView.layer.cornerRadius = self.iconImageView.width / 2;
    [self.iconImageView.layer setMasksToBounds:YES];
    self.nameLabel.text = model.doctor_name;
    self.nameTitleLabel.text = model.doctor_title_name;
    self.bannerLabel.text = [NSString stringWithFormat:@"%zd",model.operation_count];
    self.flowerLabel.text = [NSString stringWithFormat:@"%zd",model.flower];
    self.hospitalLabel.text = model.doctor_hospital_name;
    self.starLabel.text = [NSString stringWithFormat:@"%zd",model.banner];

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
